package tt.doubleagent.game;

import java.util.ArrayList;

import tt.doubleagent.data.WordPair;

public interface GameController {

	// rule id is used to identify the current game controller rules, like if
	// rule ID=1, judge constantly equals to 0.
	int ruleID = 0;

	int totalPlayers = 0;

	int majority = 0;
	int minority = 0;
	int agent = 0;
	int judge = 0;

	WordPair currentWordPair = null;

	// an array to store players info
	ArrayList<Player> positionedPlayerList = null;
	// used to identify the current displayed player's position in positioned
	// player list
	int currentDisplayedPlayerPosition = 0;

	int currentWordPackageID = 0;

	public void setTotalPlayersCount(int num);

	public void setMajorityCount(int num);

	public void setMinorityCount(int num);

	public void setAgentCount(int num);

	public void setJudgeCount(int num);

	public int getMajorityCount();

	public int getMinorityCount();

	public int getAgentCount();

	public int getJudgeCount();

	// set majority, minority, agent, judge count automatically based on
	// TotalPlayers count.
	public void setSuggestedRolePlayersCount();

	// get the next players info to display based on
	// currentDisplayedPlayerPosition
	public Player displayNextPlayer();

	// set currentDisplayedPlayerPosition
	public int setCurrentDisplayedPlayerPosition(int position);

	// distribute words to players
	public void generatePlayers();

	// force shuffle words among current players when necessary
	public void shufflePlayerWords();

	// set player attributes, like isAlive
	public boolean setPlayerAttributes(int playerPosition, Player player);

	// check Game status, if continue or not.
	public GameResult checkGameStatus();

	// send player info via SMS
	public boolean sendPlayerInfo(Player player);
}
